#include<iostream>
#include<cstring>
#include<cstdlib>
using namespace std;
char s[50];
char s1[50];
char s2[50];
char s_out[50];
int cnt ;
void chuli()
{
	cin.getline(s,sizeof(s));
	char *ss ;
	int x = 0;
	for (int i=0;i<strlen(s);i++)
	{
		if (s[i]==' ' )
		{			
			x = i;
			break;		
		}
	}
	ss = &s[x]+1;
	strcat(s2,ss);
	strncpy(s1,s,ss-s-1);
	strcat(s_out,s1);
	strcat(s_out,s2);
	int shu1 = atoi(s_out);
	memset(s_out,0,sizeof(s_out));
	strcat(s_out,s2);
	strcat(s_out,s1);
	int shu2 = atoi(s_out);
	
	if (shu2>shu1)
		cout << shu2;
	else cout << shu1;
	

	return ;
}
int main()
{
	chuli();
	return 0;
}
